<template>
  <div class="searchInput flex9">
    <div class="Top flex1">
      <TtextInput :options="options1"
      @getInputVal="getInputVal1"
      ></TtextInput>
      <TtextInput
        class="TtextInput"
        text="签约机构"
        placeholder="请输入签约机构"
        :options="options2"
        @getInputVal="getInputVal2"
      ></TtextInput>
      <TtextInput
        class="TtextInput"
        text="医生团队"
        placeholder="请输入医生团队"
        :options="options3"
        @getInputVal="getInputVal3"
      ></TtextInput>
      <TtextInput
        class="TtextInput"
        text="服务包"
        placeholder="请选择软件包"
        :options="options4"
        @getInputVal="getInputVal4"
      ></TtextInput>
    </div>
    <div class="Bottom flex1">
      <TtimeSele class="TtimeSele"></TtimeSele>
      <div class="btn flex7">
        <TseleButton :options="options"></TseleButton>
        <TexportButton></TexportButton>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import TtimeSele from "../../../components/timeSele/index.vue";
import TtextInput from "../../../components/textInput/index.vue";
import TseleButton from "../../../components/seleButton/index.vue";
import TexportButton from "../../../components/exportButton/index.vue";
import { getPendingContractSele } from "../../../http/api/PendingContract/index";

let options=ref([])
let options1 = ref();
let options2 = ref();
let options3 = ref();
let options4 = ref();

// 获取sele数据
getPendingContractSele().then((res) => {
  options1.value = res.data[0].name;
  options2.value = res.data[1].name;
  options3.value = res.data[2].name;
  options4.value = res.data[3].name;
});
// textinput1
let getInputVal1=(val:any)=>{
  if(options.value){
    options.value[0]=val

  }
}
// textinput2
let getInputVal2=(val:any)=>{
  if(options.value){
    options.value[1]=val
  }
}
// textinput3
let getInputVal3=(val:any)=>{
  if(options.value){
    options.value[2]=val
  }
}
// textinput4
let getInputVal4=(val:any)=>{
  if(options.value){

    options.value[3]=val
  }
}

</script>

<style scoped>
.searchInput {
  width: 100%;
  height: 150px;
  box-sizing: border-box;
  padding-left: 20px;
  margin-top: 5px;
  background-color: #ffffff;
}
.TtextInput {
  margin-left: 40px;
}
.btn {
  width: 150px;
  margin-left: 60px;
}
</style>
